package com.spotmanger.project.config;

import com.spotmanger.project.core.geohandler.MybatisGeometryHandler;
import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class BatisPlusConfig {
    @Bean
    public String myGeoInterceptor(SqlSessionFactory sqlSessionFactory) {
        MybatisGeometryHandler sqlInterceptor = new MybatisGeometryHandler();
        sqlSessionFactory.getConfiguration().addInterceptor(sqlInterceptor);
        return "myGeointerceptor";
    }
}